/*    */ package provider;
/*    */ 
/*    */ import java.util.ArrayList;
/*    */ import java.util.Collections;
/*    */ import java.util.HashMap;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class MapleDataDirectoryEntry extends MapleDataEntry {
/* 10 */   private final List<MapleDataDirectoryEntry> subdirs = new ArrayList<>();
/* 11 */   private final List<MapleDataFileEntry> files = new ArrayList<>();
/* 12 */   private final Map<String, MapleDataEntry> entries = new HashMap<>();
/*    */   
/*    */   public MapleDataDirectoryEntry(String name, int size, int checksum, MapleDataEntity parent) {
/* 15 */     super(name, size, checksum, parent);
/*    */   }
/*    */   
/*    */   public MapleDataDirectoryEntry() {
/* 19 */     super(null, 0, 0, null);
/*    */   }
/*    */   
/*    */   public void addDirectory(MapleDataDirectoryEntry dir) {
/* 23 */     this.subdirs.add(dir);
/* 24 */     this.entries.put(dir.getName(), dir);
/*    */   }
/*    */   
/*    */   public void addFile(MapleDataFileEntry fileEntry) {
/* 28 */     this.files.add(fileEntry);
/* 29 */     this.entries.put(fileEntry.getName(), fileEntry);
/*    */   }
/*    */   
/*    */   public List<MapleDataDirectoryEntry> getSubdirectories() {
/* 33 */     return Collections.unmodifiableList(this.subdirs);
/*    */   }
/*    */   
/*    */   public List<MapleDataFileEntry> getFiles() {
/* 37 */     return Collections.unmodifiableList(this.files);
/*    */   }
/*    */   
/*    */   public MapleDataEntry getEntry(String name) {
/* 41 */     return this.entries.get(name);
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\provider\MapleDataDirectoryEntry.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */